package com.tricode.ile.training.task.one.reversedarray;

import java.util.ArrayList;
import java.util.Scanner;

public class MainReverseArray {

	public static void main(String[] args) {

		GenerateReversedArray reversed = new GenerateReversedArray();
		
		Scanner scanner = new Scanner(System.in);
		ArrayList<String> list = new ArrayList<String>();
		System.out.println("Enter number of elements:");
		int numberOfElements = scanner.nextInt();
		System.out.println("Enter data:");
		int count = 0;
		while (count < numberOfElements) {
			list.add(scanner.next());
			count++;
		}
		scanner.close();
		System.out.println("\nThe elements you entered were:" + list);
		System.out.println("\nThe elements reversed are:" + reversed.reverseArray(list));
	}

}
